import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';

import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
import { NZ_I18N } from 'ng-zorro-antd/i18n';
import { zh_CN } from 'ng-zorro-antd/i18n';
import { registerLocaleData } from '@angular/common';
import zh from '@angular/common/locales/zh';
import { FormsModule } from '@angular/forms';
import { HttpClientModule } from '@angular/common/http';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { NzLayoutModule } from 'ng-zorro-antd/layout';
import { CourseComponent } from './course/course.component';
import { HomeComponent } from './home/home.component';
import { MarkdownModule } from 'ngx-markdown';
import { NzCodeEditorModule } from 'ng-zorro-antd/code-editor';
import { NzResizableModule } from 'ng-zorro-antd/resizable';
import { NzGridModule } from 'ng-zorro-antd/grid';
import { NzMessageModule } from 'ng-zorro-antd/message';
import { NzModalModule } from 'ng-zorro-antd/modal';
import { NzCollapseModule } from 'ng-zorro-antd/collapse';
import { NzListModule } from 'ng-zorro-antd/list'
import { NzCardModule } from 'ng-zorro-antd/card';
import { CreatorComponent } from './creator/creator.component'
import { NzTabsModule } from 'ng-zorro-antd/tabs';
import { NzInputNumberModule } from 'ng-zorro-antd/input-number';
import { NzInputModule } from 'ng-zorro-antd/input';
import { NzPopoverModule } from 'ng-zorro-antd/popover';
import { NzButtonModule } from 'ng-zorro-antd/button';
import { ManageComponent } from './manage/manage.component';
import { NgScrollbarModule } from 'ngx-scrollbar';
import { NzTableModule } from 'ng-zorro-antd/table';
import { NzDividerModule } from 'ng-zorro-antd/divider';
import { CookieModule } from 'ngx-cookie';
import { WorkgroundComponent } from './workground/workground.component';

registerLocaleData(zh);

@NgModule({
    declarations: [
        AppComponent, CourseComponent, HomeComponent, CreatorComponent, ManageComponent, WorkgroundComponent
    ],
    imports: [
        BrowserModule,
        AppRoutingModule,
        FormsModule,
        HttpClientModule,
        BrowserAnimationsModule,
        NzLayoutModule,
        MarkdownModule.forRoot(),
        NzCodeEditorModule,
        NzResizableModule,
        NzGridModule,
        NzMessageModule,
        NzModalModule,
        NzCollapseModule,
        NzListModule,
        NzCardModule,
        NzTabsModule,
        NzInputNumberModule,
        NzInputModule,
        NzPopoverModule,
        NzButtonModule,
        NgScrollbarModule,
        NzTableModule,
        NzDividerModule,
        CookieModule.forRoot()
    ],
    providers: [
        {
            provide: NZ_I18N,
            useValue: zh_CN
        }, {
            provide: Window,
            useValue: window
        }
    ],
    bootstrap: [AppComponent]
})
export class AppModule { }
